package com.ls.blog.mapper;

import com.ls.blog.dto.UserDTO;
import com.ls.blog.entity.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ls.blog.vo.PageVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author lishun
 * @since 2022-01-14
 */
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据用户名查找用户
     * @param username
     * @return
     */
    User loadUserByUsername(String username);

    /**
     * 分页查询用户列表
     * @param pageVO
     * @return
     */
    List<UserDTO> userDTOList(@Param("pageVO") PageVO pageVO);
}
